using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpaceTimePatternMiningTools._TimeSeriesForecasting
{
    /// <summary>
    /// <para>Evaluate Forecasts By Location</para>
    /// <para>Selects the most accurate among multiple forecasting results for each location of a space-time cube. This allows you to use multiple tools in the Time Series Forecasting toolset with the same time series data and select the best forecast for each location.</para>
    /// <para>在多个预测结果中为时空立方体的每个位置选择最准确的结果。这允许您在时序预测工具集中使用多个工具来处理相同的时序数据，并为每个位置选择最佳预测。</para>
    /// </summary>    
    [DisplayName("Evaluate Forecasts By Location")]
    public class EvaluateForecastsByLocation : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EvaluateForecastsByLocation()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_cubes">
        /// <para>Input Forecast Space Time Cubes</para>
        /// <para>The input space-time cubes containing forecasts to be compared. To be compared, all forecast cubes must be created from the same original time series data.</para>
        /// <para>包含要比较的预测的输入时空立方体。若要进行比较，必须从相同的原始时序数据创建所有预测多维数据集。</para>
        /// </param>
        /// <param name="_output_features">
        /// <para>Output Features</para>
        /// <para>The new output feature class representing the locations of the space-time cube and fields containing the forecast values of the selected method at each location. The pop-ups of the features display charts of the original time series data and the forecasts of all methods.</para>
        /// <para>新的输出要素类，用于表示时空立方体的位置，以及包含所选方法在每个位置的预测值的字段。要素的弹出窗口显示原始时间序列数据的图表和所有方法的预测。</para>
        /// </param>
        public EvaluateForecastsByLocation(List<object> _in_cubes, object _output_features)
        {
            this._in_cubes = _in_cubes;
            this._output_features = _output_features;
        }
        public override string ToolboxName => "Space Time Pattern Mining Tools";

        public override string ToolName => "Evaluate Forecasts By Location";

        public override string CallName => "stpm.EvaluateForecastsByLocation";

        public override List<string> AcceptEnvironments => ["outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_cubes, _output_features, _output_cube, _evaluate_using_validation_results.GetGPValue()];

        /// <summary>
        /// <para>Input Forecast Space Time Cubes</para>
        /// <para>The input space-time cubes containing forecasts to be compared. To be compared, all forecast cubes must be created from the same original time series data.</para>
        /// <para>包含要比较的预测的输入时空立方体。若要进行比较，必须从相同的原始时序数据创建所有预测多维数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Forecast Space Time Cubes")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_cubes { get; set; }


        /// <summary>
        /// <para>Output Features</para>
        /// <para>The new output feature class representing the locations of the space-time cube and fields containing the forecast values of the selected method at each location. The pop-ups of the features display charts of the original time series data and the forecasts of all methods.</para>
        /// <para>新的输出要素类，用于表示时空立方体的位置，以及包含所选方法在每个位置的预测值的字段。要素的弹出窗口显示原始时间序列数据的图表和所有方法的预测。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_features { get; set; }


        /// <summary>
        /// <para>Output Space Time Cube</para>
        /// <para>The output space-time cube (.nc file) containing the original time series data with the forecasts of the selected method at each location. The Visualize Space Time Cube in 3D tool can be used to view the original and forecasted values simultaneously.</para>
        /// <para>输出时空立方体（.nc 文件），其中包含原始时间序列数据以及所选方法在每个位置的预测。可视化 3D 时空立方体工具可用于同时查看原始值和预测值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Space Time Cube")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _output_cube { get; set; } = null;


        /// <summary>
        /// <para>Evaluate Using Validation Results</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the forecast method for a location will be determined using the smallest Validation RMSE or smallest Forecast RMSE.
        ///   <bulletList>
        ///     <bullet_item>Checked—The forecast method will be determined using the smallest Validation RMSE. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The forecast method will be determined using the smallest Forecast RMSE.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是使用最小的验证 RMSE 还是最小的预测 RMSE 来确定位置的预测方法。
        ///   <bulletList>
        ///     <bullet_item>选中 - 预测方法将使用最小验证 RMSE 确定。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中—将使用最小预测均方根 （RMSE） 确定预测方法。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Evaluate Using Validation Results")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _evaluate_using_validation_results_value _evaluate_using_validation_results { get; set; } = _evaluate_using_validation_results_value._true;

        public enum _evaluate_using_validation_results_value
        {
            /// <summary>
            /// <para>USE_VALIDATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_VALIDATION")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_VALIDATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_VALIDATION")]
            [GPEnumValue("false")]
            _false,

        }

        public EvaluateForecastsByLocation SetEnv(object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}